<html>
<head><meta charset="utf-8"><title>rustc_diagnostic_item · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/rustc_diagnostic_item.html">rustc_diagnostic_item</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="226337048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/rustc_diagnostic_item/near/226337048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/rustc_diagnostic_item.html#226337048">(Feb 15 2021 at 01:32)</a>:</h4>
<p>What are <code>rustc_diagnostic_item</code>s and why is <code>rustc_middle::ty::Ty</code> one?</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="cp">#[rustc_diagnostic_item = </span><span class="s">"Ty"</span><span class="cp">]</span><span class="w"></span>
<span class="k">pub</span><span class="w"> </span><span class="k">type</span> <span class="nc">Ty</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&amp;'</span><span class="na">tcx</span><span class="w"> </span><span class="n">TyS</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
</code></pre></div>



<a name="226351275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/rustc_diagnostic_item/near/226351275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/rustc_diagnostic_item.html#226351275">(Feb 15 2021 at 07:11)</a>:</h4>
<p>they're used for error reporting without having to make an enormous list of required <code>lang_items</code>. This one is probably for a rustc-internal lint.</p>



<a name="226470680"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/rustc_diagnostic_item/near/226470680" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/rustc_diagnostic_item.html#226470680">(Feb 16 2021 at 04:33)</a>:</h4>
<blockquote>
<p>This one is probably for a rustc-internal lint.</p>
</blockquote>
<p>Ah, that seems possible <span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="226552252"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/rustc_diagnostic_item/near/226552252" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/rustc_diagnostic_item.html#226552252">(Feb 16 2021 at 18:08)</a>:</h4>
<p>It's probably marked for the rustc specific lints we have.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>